<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script th:src="@{/static/js/jquery-2.1.1.min.js}"></script>
</head>
<body>
<h1>首页</h1>
<a th:href="@{'/test/ssm'}">测试ssm环境</a>
<button id="but1">send [1,2,4]</button>

<span th:text="${session.loginAdmin.getLoginAcct()}"></span>

<script>
    $(function () {
        $("#but1").click(function () {
            $.ajax({
                url:"send/array",
                method:"post",
                data:{
                  array:[1,2,4],
                },
                dataType:"text",
                contentType:"application/jsonl;charset=UTF-8",
                success:function (res) {
                    alert(res);
                    
                },
                error:function (res) {
                    alert(res)
                }
                
            })
        })
    })
</script>
</body>
</html>